<template>
	<view class="czxieyi">
		<view class="title">{{title}}</view>
		<view class="desc">{{description}}</view>
		<view v-html="content" v-if="content"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '',
				description: '',
				content: '',
			}
		},
		onLoad(options) {
			let article_id = options.id;
			
			this.request({
				url: '/xcx/articledetail',
				data: {
					article_id: article_id,
				}
			}).then(res => {
				if (res.data.code == 200) {
					this.title = res.data.data.title;
					this.description = res.data.data.description;
					this.content = res.data.data.content;
				} else {
					uni.showToast({
						title: '请求失败，请稍后再试',
						icon: 'none'
					})
				}
			})
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.czxieyi{
		width: 100%;
		margin: 0 auto;
		padding: 5%;
		box-sizing: border-box;
		
		.title{
			width: 100%;
			text-align: center;
			font-size: 32rpx;
			font-weight: 700;
			margin-bottom: 40rpx;
		}
		
		.desc{
			line-height: 46rpx;
			text-align: justify;
			margin-bottom: 10rpx;
		}
	}
</style>